package view;

import java.awt.*;

import javax.swing.*;

import controller.AapController;
import javax.swing.GroupLayout.Alignment;


public class AapView extends JFrame{
	public JFrame frame = new JFrame();
	
	public AapView() {
		setSize(326,229);
		setResizable(false);
		
	    
	    setTitle("Aap");
	   
	    setDefaultCloseOperation(EXIT_ON_CLOSE);

	    
	    setLocationRelativeTo(null);
	    
	    JButton btnBevallen = new JButton("Bevallen");
	    GroupLayout groupLayout = new GroupLayout(getContentPane());
	    groupLayout.setHorizontalGroup(
	    	groupLayout.createParallelGroup(Alignment.LEADING)
	    		.addGroup(groupLayout.createSequentialGroup()
	    			.addContainerGap()
	    			.addComponent(btnBevallen)
	    			.addContainerGap(221, Short.MAX_VALUE))
	    );
	    groupLayout.setVerticalGroup(
	    	groupLayout.createParallelGroup(Alignment.LEADING)
	    		.addGroup(groupLayout.createSequentialGroup()
	    			.addContainerGap()
	    			.addComponent(btnBevallen)
	    			.addContainerGap(166, Short.MAX_VALUE))
	    );
	    getContentPane().setLayout(groupLayout);
	    setVisible(true);
	    
	    btnBevallen.addActionListener(new AapController());
	    btnBevallen.setActionCommand("Bevallen");
	}
}
